/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.dcpApplication.question1.polymophism.smallBussinessImpl;

import za.ac.cput.dcpApplication.question1.polymophism.LoanInterest;

/**
 *
 * @author spheshie
 */
public class SmallBusinessImpl implements LoanInterest {
    
    private String name;
    private String registerNum;
    private double loanAmount;
    
    public SmallBusinessImpl() {}
    
    public SmallBusinessImpl(String nm, String regnum, double amt){
        
        name = nm;
        registerNum = regnum;
        loanAmount = amt;
    }
    
    public String toString(){
        
        return "business name: " + name + " loan amount is:" + loanAmount;
    }

    @Override
    public double interest() {
        
        return loanAmount + (loanAmount* 0.15);
    }
    
}
